extends HSplitContainer

class_name RankLine

@onready var rank = $rank
@onready var score = $score

var rank_text = ""
var score_text = ""

# Called when the node enters the scene tree for the first time.
func _ready():
	pass
	
func setText(rank_text, score_text):
	rank.text = "第" + str(rank_text) + "名"
	score.text = str(score_text)
	
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
	pass

static var rank_line = preload("res://scenes/menu/rank_line.tscn")

static func new_rank_line(rank, score, lines: VBoxContainer):
	var rl = rank_line.instantiate() as RankLine
	lines.add_child(rl)
	rl.setText(rank, score)
